# coding: utf-8
from enum import Enum

from qfluentwidgets import StyleSheetBase, Theme, isDarkTheme, qconfig
from ..utils.log_rec import logger


class StyleSheet(StyleSheetBase, Enum):
    """Style sheet"""

    INTERFACE = "interface"
    SETTING_INTERFACE = "setting_interface"

    def path(self, theme=Theme.AUTO):
        theme = qconfig.theme if theme == Theme.AUTO else theme
        logger.debug(
            f"load qss file:  :/qss/qss/{theme.value.lower()}/{self.value}.qss"
        )
        return f":/qss/qss/{theme.value.lower()}/{self.value}.qss"
